<html>
<head><meta charset="utf-8"><title>measuring rustc compilation · t-compiler/performance · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/index.html">t-compiler/performance</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html">measuring rustc compilation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211282603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211282603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211282603">(Sep 25 2020 at 16:41)</a>:</h4>
<p>The good news is that I've pushed up commits which should <em>start</em> us down the road of being able to collect data from rust-lang/rust stage0 builds (but with the latest master rustc, i.e., self-bootstrapping). No rendering or really access to that data publicly yet, and it looks like it'll be pretty high variance initially at least, but I'm hopeful that we can make progress on those over time.</p>
<p>Currently we just collecting the raw timing data (in seconds) that's printed by bootstrap in the RUSTC-TIMING comments; we also don't prevent the natural parallelism (-j12 on collection server, I believe). Depending on how high the variance ends up being with that we'll fine-tune things over time I expect.</p>



<a name="211282717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211282717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211282717">(Sep 25 2020 at 16:42)</a>:</h4>
<p>I am particularly interested in adding "compilation max-rss" with an interest of driving that down, since we know that contributors on relatively weaker hardware (really, anything &lt;=8 GB) are currently mostly unable to compile rustc without heroics locally.</p>



<a name="211301978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211301978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211301978">(Sep 25 2020 at 19:12)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/76680">#76680</a> was a recent effort from a (new?) contibutor to reduce the amount of generated LLVM IR within <code>rustc</code>. It seems to have sped up a few benchmarks as well. I'm sure they would appreciate this, since they ran into a problem that I've also hit before:</p>
<blockquote>
<p>Watching YouTube while compiling added to much noise...</p>
</blockquote>



<a name="211316586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211316586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211316586">(Sep 25 2020 at 20:52)</a>:</h4>
<p>Haha, same</p>



<a name="211316701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211316701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211316701">(Sep 25 2020 at 20:53)</a>:</h4>
<p>Literally the reason why I don't like running perf locally.</p>



<a name="211320037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211320037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211320037">(Sep 25 2020 at 21:28)</a>:</h4>
<p>initial results on a try build (no two master commits have been rustc benchmarked yet): <a href="https://perf.rust-lang.org/compare.html?start=b984ef6797ff17faa2b1e0ebb54b78de1491e5fd&amp;end=da15df4c276090851136ca9a686285f76cbaaf98">https://perf.rust-lang.org/compare.html?start=b984ef6797ff17faa2b1e0ebb54b78de1491e5fd&amp;end=da15df4c276090851136ca9a686285f76cbaaf98</a>, scroll down for bootstrap timings</p>



<a name="211320047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211320047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211320047">(Sep 25 2020 at 21:28)</a>:</h4>
<p>(currently we hide anything less than 10 seconds)</p>



<a name="211320644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211320644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211320644">(Sep 25 2020 at 21:34)</a>:</h4>
<p>I'm guessing a lot of that variance is scheduler luck?</p>



<a name="211321420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211321420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211321420">(Sep 25 2020 at 21:42)</a>:</h4>
<p>(That's a low confidence guess BTW)</p>



<a name="211322007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322007">(Sep 25 2020 at 21:48)</a>:</h4>
<p>hm, I don't think scheduler here is quite the right word</p>



<a name="211322029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322029">(Sep 25 2020 at 21:48)</a>:</h4>
<p>I guess at some level it is</p>



<a name="211322049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322049">(Sep 25 2020 at 21:48)</a>:</h4>
<p>but it's basically that the jobserver is entirely random essentially in terms of who gets the next token</p>



<a name="211322128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322128">(Sep 25 2020 at 21:49)</a>:</h4>
<p>well, jobserver is deterministic, but enqueuing into jobserver queue can easily be swapped by small differences in timing, yielding outsized effects on total time as you either serialize or not cgus I suspect</p>



<a name="211322192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322192">(Sep 25 2020 at 21:50)</a>:</h4>
<p>I've pushed up a commit that runs the build twice and we'll take the min for each crate, hopefully that'll be enough -- I don't know that we can afford three runs</p>



<a name="211322302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322302">(Sep 25 2020 at 21:51)</a>:</h4>
<p>I'm actually quite happy to see that on recent, but not too expensive hardware ($250-300 CPU, without discounts -- 3600x), you can get a stage1 build in roughly ~7 minutes these days from scratch</p>



<a name="211322354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211322354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211322354">(Sep 25 2020 at 21:52)</a>:</h4>
<p>I guess it really does help to have those 12 threads</p>



<a name="211359930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/measuring%20rustc%20compilation/near/211359930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/measuring.20rustc.20compilation.html#211359930">(Sep 26 2020 at 13:25)</a>:</h4>
<p>How did you speed up building the compiler this time? ryzen.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>